﻿using MvvmCross.Wpf.Views;
using Sidvall.UI.Views;
using Sidvall.UI.Wpf.ViewModels;

namespace Sidvall.UI.Wpf.Views
{
    public partial class StartView : MvxWpfView, IViewModelProvider
    {
        #region Public Members

        public new StartViewModel ViewModel
        {
            get
            {
                return (StartViewModel)base.ViewModel;
            }
            set
            {
                base.ViewModel = value;
            }
        }

        Sidvall.UI.ViewModels.IViewModel IViewModelProvider.ViewModel
        {
            get
            {
                return this.ViewModel;
            }
        }

        #endregion
        #region Constructors

        public StartView()
        {
            InitializeComponent();
        }

        #endregion

        private void OnDialogButtonClick(object sender, System.Windows.RoutedEventArgs e)
        {
            Sidvall.UI.SystemContext.Current.DialogManager.ShowOkCancelMessageAsync("test", "kjhkhkh", UI.Dialogs.MessageType.Information, true);
        }

        private void OnEnglishButtonClick(object sender, System.Windows.RoutedEventArgs e)
        {
            var item = new System.Globalization.CultureInfo("en");
            Sidvall.SystemContext.Current.CultureManager.SetCurrentCulture(item);
        }

        private void OnSwedishButtonClick(object sender, System.Windows.RoutedEventArgs e)
        {
            var item = new System.Globalization.CultureInfo("se");
            Sidvall.SystemContext.Current.CultureManager.SetCurrentCulture(item);
        }
    }
}
